package com.example.api.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "storage", url = "http://127.0.0.1:18082")
public interface StorageClient {

    /**
     * 扣除存储数量
     */
    @RequestMapping(path = "/storage/{commodityCode}/{count}")
    String deduct(@RequestParam("commodityCode") String commodityCode,
                   @RequestParam("count") int count);

}
